url="/account/shipping-address.html"
layout="default"
==


{% set addresses = catalog.getAddresses %}
<div class="address_content">
		<!-- breadcrumbs -->
		<div class="breadcrumbs">
			<div class="container">
				<ul>
					<li class="fl" ><a href="/">FASHIONDM</a></li>
					<li class="fl" >アドレス帳</li>
				</ul>
			</div>
		</div>
		<!-- breadcrumbs end -->
		<div class="addressCont">
			<div class="container">
				<h2 class="pageHead1">アドレス帳</h2>
				<div class="ov dashboardBox">
					<div class="fl d_sidemenus">
						{% partial 'account/left-bar' %}
					</div>
					<div class="fr d_main">
						<div class="main-ttl">アドレス帳</div>
						<div class="addressBox">
							<!-- empty -->
							{% if count(addresses) == 0 %}
							<div class="empty">
								<h3 class="emptyH3">住所は登録されていません。</h3>
								<div class="btn-changed onBigBtn">
									<a href="{{ 'account/update-shipping-address'|page }}">
										<img alt="住所は登録されていません" src="{{ 'assets/img/btn-add-new-address.jpg'|theme }}">
									</a>
								</div>
							</div>
							<div class="btn-changed">
								<a href="/" shape="rect" class="fl">
									<img alt="トップページ" src="{{ 'assets/img/btn-to-top-small.jpg'|theme }}">
								</a>
								<a href="{{ 'account/dashboard'|page }}" shape="rect" class="fr">
									<img alt="マイページトップ" src="{{ 'assets/img/btn-to-membertop-small.jpg'|theme }}">
								</a>
							</div>
							{% else %}
							<!-- empty end -->

							<div class="btn-changed onBigBtn">
								<a href="{{ 'account/update-shipping-address'|page }}" shape="rect">
									<img alt="マイページトップ" src="{{ 'assets/img/btn-add-new-address.jpg'|theme }}">
								</a>
							</div>
							<ul class="addressBoxUl">
								{% for addr in addresses %}
								<li>
									<div class="address-ttl">{{ addr.address }}</div>
									<table>
										<tbody>
											<tr>
												<td colspan="1" rowspan="1">
							                        <div class="name"><b>{{ addr.first_name }},{{ addr.last_name }}</b></div>
							                        <div class="address">〒{{addr.zip}} {{ addr.state.name }} {{ addr.city }} {{ addr.address }}</div>
							                        <div class="tel">{{ addr.phone }}</div>
							                    </td>
							                    <td colspan="1" class="actions" rowspan="1">
							                        <a href="{{ 'account/update-shipping-address'|page({id: addr.id}) }}" shape="rect">
							                        	<span class="change">変更</span>
							                        </a>
							                        <input type="submit" name="" data-request="onDeleteAddress" data-request-data="id: {{addr.id}}" value="削除" class="delete">
								                </td>
								            </tr>
								        </tbody>
								    </table>
								</li>
								{% endfor %}
							</ul>
							{% endif %}
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>